<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2018/6/2
 * Time: 10:00
 */

namespace app\index\controller\gupiao;
use app\index\controller\Base;
use think\Db;

class Lists extends Base
{

    // 这个是股票列表
    public function lists(){

        $type = input('type','remark');

        switch ($type){
            // 个股点评
            case 'remark':
                $count = Db('gupiao')->where('is_show',1)->where('is_recomm',0)->count();
                break;

            case 'recomm':
                $count = Db('gupiao')->where('is_show',1)->where('is_recomm',1)->count();
                break;
        }

        $this->assign('count',$count);

        $this->assign('type',$type);
        $this->assign('admin1',$this->admin);

        return $this->fetch();
    }


    // 新建点评
    public  function  addlive(){

        $id = input('');
        if(count($id) > 0){
            $id['id'] = input('id');
        }
        $this->assign('id',$id['id']);
        return $this->fetch();
    }


    //  精华分享  列表
    public function shareList(){

        $this->assign('type',input('type'));
        return $this->fetch();
    }



    // 精华分享 详情
    public function shareLnfo(){

        $id = input('id');
        $this->assign('id',$id);
        $this->assign('admin',$this->admin);
        return $this->fetch();
    }


    // 编辑股票界面
    public function  editlist(){
        $id = input('id');
        $this->assign('id',$id);
        return $this->fetch();
    }

}